package com.zhentao.domain.excel;

public enum ReturnSexEnum {
    BORROWING("0", "男"),
    RETURNED("1", "女");

    private String code;
    private String description;

    ReturnSexEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static String getDescriptionByCode(String code) {
        for (ReturnSexEnum status : ReturnSexEnum.values()) {
            if (status.getCode().equals(code)) {
                return status.getDescription();
            }
        }
        return null; // or throw exception if needed
    }
}
